﻿using System;
using UnityEditor;
using UnityEngine;

namespace Nirvana
{
    [CustomEditor(typeof(RadialLayoutGroup))]
    public class RadialLayoutGroupEditor : Editor
    {
        private SerializedProperty distance;
        private SerializedProperty minAngle;
        private SerializedProperty maxAngle;
        private SerializedProperty startAngle;
        private void OnEnable()
        {
            if (this.target == null)
            {
                return;
            }
            SerializedObject serializedObject = base.serializedObject;
            this.distance = serializedObject.FindProperty("distance");
            this.minAngle = serializedObject.FindProperty("minAngle");
            this.maxAngle = serializedObject.FindProperty("maxAngle");
            this.startAngle = serializedObject.FindProperty("startAngle");
        }

        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            EditorGUILayout.PropertyField(this.distance, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.minAngle, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.maxAngle, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.startAngle, new GUILayoutOption[0]);
            base.serializedObject.ApplyModifiedProperties();
        }

    }
}

